import {ref, reactive} from 'vue'
import {getFolder} from "@/api/media/storage";
import store from "@/store";

export default function (groupid_list) {
  const rootFolderList = ref([])
  const queryList = reactive({
    action: 'subiddir',
    admin: store.getters.subinfo.isadmin,
    groupid: groupid_list.value.join(','),
    type: 5
  })
  getFolder(queryList).then(response => {
    rootFolderList.value = response.data
  })

  return {
    rootFolderList
  }
}
